<template>
  <div ref="BarChart" class="bar-chart" />
</template>

<script>
import * as echarts from 'echarts'
export default {
  name: 'BarChart',
  mounted() {
    const barEchart = echarts.init(this.$refs.BarChart)
    barEchart.setOption({
      grid: {
        left: 0,
        right: 0
      },
      xAxis: {
        show: false,
        data: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月']
      },
      yAxis: {
        show: false
      },
      series: {
        type: 'bar',
        data: [49, 97, 36, 52, 43, 68, 30, 97, 110, 78, 69, 136]
      }
    })
  }
}
</script>
<style >
.bar-chart {
  width: 100%;
  height: 100%;
}
</style>
